<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<script src="<c:url value="/js/dojo/dojo.js"/>"></script>
<script type="text/javascript">
dojo.require('dojox.data.JsonRestStore');
dojo.require('dijit.Tree');

require([
    "dijit/MenuBar",
    "dijit/PopupMenuBarItem",
    "dijit/Menu",
    "dijit/MenuItem",
    "dijit/DropDownMenu",
    "dojo/domReady!"
], function(MenuBar, PopupMenuBarItem, Menu, MenuItem, DropDownMenu){
    var pMenuBar = new MenuBar({});

    var pSubMenu = new DropDownMenu({});
    pSubMenu.addChild(new MenuItem({
        label: "Vytvor objekt #1"
    }));
    pSubMenu.addChild(new MenuItem({
        label: "Vytvor objekt #2"
    }));
    pMenuBar.addChild(new PopupMenuBarItem({
        label: "Vytvor",
        popup: pSubMenu
    }));

    var pSubMenu2 = new DropDownMenu({});
    pSubMenu2.addChild(new MenuItem({
        label: "Cut",
        iconClass: "dijitEditorIcon dijitEditorIconCut"
    }));
    pSubMenu2.addChild(new MenuItem({
        label: "Kopiruj",
        iconClass: "dijitEditorIcon dijitEditorIconCopy"
    }));
    pSubMenu2.addChild(new MenuItem({
        label: "Vloz",
        iconClass: "dijitEditorIcon dijitEditorIconPaste"
    }));
    pMenuBar.addChild(new PopupMenuBarItem({
        label: "Edit",
        popup: pSubMenu2
    }));

    pMenuBar.placeAt("wrapper");
    pMenuBar.startup();
});
	</script>
	<html >
<head>

	<link rel="stylesheet" href="../../_static/js/dojo/../dijit/themes/claro/claro.css">
	
	<script>dojoConfig = {async: true, parseOnLoad: false}</script>
	<script src='//ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js'></script>
	
	<script>
require([
    "dojo/store/Memory", "dijit/form/FilteringSelect", "dojo/domReady!"
], function(Memory, FilteringSelect){
    var stateStore = new Memory({
        data: [
            {name:"Alabama", id:"AL"},
            {name:"Alaska", id:"AK"},
            {name:"American Samoa", id:"AS"},
            {name:"Arizona", id:"AZ"},
            {name:"Arkansas", id:"AR"},
            {name:"Armed Forces Europe", id:"AE"},
            {name:"Armed Forces Pacific", id:"AP"},
            {name:"Armed Forces the Americas", id:"AA"},
            {name:"California", id:"CA"},
            {name:"Colorado", id:"CO"},
            {name:"Connecticut", id:"CT"},
            {name:"Delaware", id:"DE"}
        ]
    });

    var filteringSelect = new FilteringSelect({
        id: "stateSelect",
        name: "state",
        value: "CA",
        store: stateStore,
        searchAttr: "name"
    }, "stateSelect");
});
	</script>
</head>
<body class="claro">
    <input id="stateSelect">
<p>
    <button onclick="alert(dijit.byId('stateSelect').get('value'))">Get value</button>
    <button onclick="alert(dijit.byId('stateSelect').get('displayedValue'))">Get displayed value</button>
</p>
</body>
</html>
    <div id="wrapper"></div>
</body>
</html>


<div id="side-bar">
	<a href="<c:url value="/"/>"><fmt:message key="button.home" /></a>
	<p>
	
		<fmt:message key="address.title" />
	</p>
	<a href="<c:url value="/address/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/address/list.html"/>"> <fmt:message
			key="button.listOfAddress" />
		
	</a>
	<fmt:message key="document.title" />
	</p>
	<a href="<c:url value="/document/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/document/list.html"/>"> <fmt:message
			key="button.listOfDocuments" />
	</a>
	<p>
		<fmt:message key="person.title" />
	</p>
	<a href="<c:url value="/person/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/person/list.html"/>"> <fmt:message
			key="button.listOfPersons" />
	</a>
	<p>
		<fmt:message key="personType.title" />
	</p>
	<a href="<c:url value="/personType/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/personType/list.html"/>"> <fmt:message
			key="button.listOfPersonsType" />
	</a>
	<p>
		<fmt:message key="product.title" />
	</p>
	<a href="<c:url value="/product/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/product/list.html"/>"> <fmt:message
			key="button.listOfProduct" />
	</a>
	<p>
		<fmt:message key="productType.title" />
	</p>
	<a href="<c:url value="/productType/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/productType/list.html"/>"> <fmt:message
			key="button.listOfProductType" />
	</a>
	<p>
		<fmt:message key="registration.title" />
	</p>
	<a href="<c:url value="/registration/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/registration/list.html"/>"> <fmt:message
			key="button.listOfRegistration" />
	</a>
	<p>
		<fmt:message key="shop.title" />
	</p>
	<a href="<c:url value="/shop/form.html"/>"> <fmt:message
			key="button.create" />
	</a> <a href="<c:url value="/shop/list.html"/>"> <fmt:message
			key="button.listOfShop" />
	</a>
</div>
